#ifndef LEMC_LEM_H
#define LEMC_LEM_H

#include <string>

#include "../level/level.h"
#include "actionnone.h"
#include "actionfall.h"

/*
* A class for the most central unit in the game, the lem.
*/
class Lem
{
private:
	float m_x;
	float m_y;

	std::string m_graphics;
	Level* m_level;

	Action* m_action;
	Action* m_next_action;

	void CheckActionChange();

public:
	Lem(Level* level, std::string graphics);
	~Lem();

	void Spawn(float x, float y);
	void SetNextAction(Action* action);

	void Update(float timing_factor);
	void Draw();

	std::string get_graphics() { return m_graphics; }
	float x() { return m_x; }
	float y() { return m_y; }
	void set_x(float x) { m_x = x; }
	void set_y(float y) { m_y = y; }
	Level* level() { return m_level; }
	
	unsigned action_name() { return m_action->action_name(); }
};

#endif